<%--
功能：显示属性值默认值 input
--%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib prefix="probiz" tagdir="/WEB-INF/tags/probiz"%>
<%@ attribute name="dataType" required="false" type="java.lang.Integer"%>
<%@ attribute name="defaultValue" required="false" type="java.lang.String"%>
<c:if test="${empty dataType or dataType ==0}">
	<c:set var="dataType" value="11"/>
</c:if>

<span id="defaultValueField">
<c:choose>
  <c:when test="${dataType == 1}">
     <input id="defaultValue" name="defaultValue" value="${defaultValue}" class="inputtxt" style="width:300px;" validconf="maxlength=500"/>
  </c:when>

  <c:when test="${dataType == 2}">
     <input id="defaultValue" name="defaultValue" value="${defaultValue}" class="inputtxt" style="width:300px;"  validconf="url,maxlength=150"/>
  </c:when>
  
  <c:when test="${dataType == 3}">
	 <script>
         function uploadComplete(path){
            //$("defaultValueImage").src="${mediaPath}"+path;
         }
        </script>
       	 <input id="defaultValue" name="defaultValue" value="${defaultValue}" type="text"/>
       	 <!-- 
         <img width="58px" heigth="58px" id="defaultValueImage" src="${mediaPath}${defaultValue}" border="0" onerror="this.src=__defaultImage_s0;this.onerror='';"/>
          -->
         <probiz:plugin_upload fileInputId="defaultValue" onComplete="uploadComplete"/>
        
  </c:when>
  
  <c:when test="${dataType == 4}">
       <input id="defaultValue" name="defaultValue" value="${defaultValue}" class="inputtxt" style="width:120px;"  validconf="integer"/>
  </c:when>
  
  <c:when test="${dataType == 5}">
     <input id="defaultValue" name="defaultValue" value="${defaultValue}" class="inputtxt" style="width:120px;"  validconf="double"/>
  </c:when>
  
  <c:when test="${dataType == 6}">
 	 <input type="checkbox" name="defaultValueCheck" id="defaultValueCheck" <c:if test="${defaultValue == '1'}">checked</c:if>  onclick="if(this.checked){$('defaultValue').value=1;}else{$('defaultValue').value=0}"/>     
     <input id="defaultValue" name="defaultValue" value="${(empty defaultValue)?0:defaultValue}" type="hidden"/>
  </c:when>
  
  <c:when test="${dataType == 7}">
     <input id="defaultValue" name="defaultValue" value="${defaultValue}" class="inputtxt" style="width:100px;"  validconf="date"/>  
     <probiz:ui_datePicker outPut="defaultValue" />  
  </c:when>    
  
  <c:when test="${dataType == 8}">
     <input id="defaultValue" name="defaultValue" value="${defaultValue}" class="inputtxt" style="width:300px;"  validconf="maxlength=150"/>
  </c:when>
  
  <c:when test="${dataType == 9}">
    <input id="defaultValue" name="defaultValue" value="${defaultValue}" class="inputtxt" style="width:300px;"  validconf="maxlength=150"/>
  </c:when>
  
  <c:when test="${dataType == 10}">
      <input id="defaultValue" name="defaultValue" value="${defaultValue}" class="inputtxt" style="width:300px;"  validconf="maxlength=36"/>
  </c:when>
  
  <c:otherwise>
      <textarea name="defaultValue" id="defaultValue" class="textareatxt" style="width:500px;height:50px;" validconf="maxlength=10000">${defaultValue}</textarea>
  </c:otherwise>
  
</c:choose>
</span>
<c:if test="${dataType!=3}">
<probiz:plugin_tip id="defaultValueField_tip"><fmt:message key="attribute.defaultValue.tip.${dataType}"/></probiz:plugin_tip>
</c:if>

